package com.designMode.Decorator;


// 继承的目的是为了继承共同的类型

public class Egg extends Powder {
    Powder powder;

    public Egg(Powder powder) {
        this.powder = powder;
    }

    public double cost(){
        return 1.5 + powder.basePrice;
    }
}
